﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Visa.DB;

namespace VisaApp.Models
{
    public class TopicModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string NoiDung { get; set; }
        public Nullable<bool> Status { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }
        public Nullable<bool> Detele { get; set; }
        public string Keywork { get; set; }
        public string metaDescription { get; set; }
        public string MetaTitle { get; set; }
        public string Seession_Code { get; set; }


        public static void MapFrom(TopicModel model, ref Topic entity)
        {
            entity.Id = model.Id;
            entity.Name = model.Name;
            entity.NoiDung = model.NoiDung;
            entity.Status = model.Status;
            entity.DateCreate = model.DateCreate;
            entity.Detele = model.Detele;
            entity.Keywork = model.Keywork;
            entity.metaDescription = model.metaDescription;
            entity.MetaTitle = model.MetaTitle;
            entity.Seession_Code = model.Seession_Code;
        }

        public static void MapFrom(Topic entity, ref TopicModel model)
        {
            model.Id = entity.Id;
            model.Name = entity.Name;
            model.NoiDung = entity.NoiDung;
            model.Status = entity.Status;
            model.DateCreate = entity.DateCreate;
            model.Detele = entity.Detele;
            model.Keywork = entity.Keywork;
            model.metaDescription = entity.metaDescription;
            model.MetaTitle = entity.MetaTitle;
            model.Seession_Code = entity.Seession_Code;
        }

    }
}